<template>
<div>
                <el-input v-if='code'  :value="data| toFixed2" disabled></el-input>
                <template v-else>  
                    <el-input v-if='length==2' v-number="2" v-model.number="data"></el-input>
                    <el-input v-if='length==4' v-number="4" v-model.number="data"></el-input>                              
                </template>      
                <span class="convertCurrency">{{data|convertCurrency}}</span>
</div>
</template>


<script>
export default {
    data(){
        return{
            // lengths:3
        } 
    },
    props:{
        length:{
            type:Number
        },
        data:{
            type:String
        },
        code:{
            type:Boolean
        }
    },
    mounted(){
        
    }
}
</script>
